package com.chinasofti.framework.dataaccess;

import java.util.ArrayList;

import com.chinasofti.framework.data.Entity;
import com.chinasofti.framework.net.ResponseDataCategory;
import com.chinasofti.framework.parser.XmlParser;

public interface IReadDataAccess<T extends Entity> {
	public T createEntityInstance();
	public void loadAll(ArrayList<T> outEntities) throws Exception;
	public void load(Object key, T outEntity) throws Exception;
	public void load(Filter filter, ArrayList<T> outEntities) throws Exception;
	public void load(ArrayList<Parameter> params, ArrayList<T> outEntities) throws Exception;

	public long loadAll(long from, long to, ArrayList<T> entities, 
			ArrayList<ResponseDataCategory> outCategories) 
			throws Exception;
	
	public long load(Filter filter, long from, long to, ArrayList<T> outEntities, 
			ArrayList<ResponseDataCategory> outCategories) throws Exception;

	public long load(ArrayList<Parameter> params, long from, long to, 
			ArrayList<T> outEntities, ArrayList<ResponseDataCategory> categorieslong)
			throws Exception;
	
	public XmlParser<T> getParser();

}
